package com.lbd.bonus.bean;

import com.lbd.base.bean.AbstractEntity;
import lombok.*;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * Created by Yuanbo on 2016/9/22.
 * 用户奖励发放详情
 */
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@DynamicUpdate
@Entity
public class SysUserBonus extends AbstractEntity {
    @NotNull
    private String userId; //varchar(36) NOT NULL
    private Integer state; //int(10) NULL1未使用,2已使用,3已过期
    private Date useTime; //timestamp(6) NOT NULL使用时间
    private String activityId; //varchar(36) NULL活动id
    private String activityDescribe;
    private String orderId;
    @ManyToOne
    @JoinColumn(name = "bonus_id")
    private Bonus bonus;


}
